package com.javalab._7thread._2Operate._4Yield;

/**
 * 打印单数的线程
 */
public class SingleThread extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            if (i % 2 == 1) {
                System.out.println("我打印单数 =>" + i);
                continue;
            }
            Thread.yield();
        }
    }
}
